Skip to content

[iOS/macCatalyst] [Candidate Fix] Editor shadow and theme regression caused by BackgroundColor reset on initial handler connection#35343

Merged
kubaflo merged 2 commits into
dotnet:inflight/candidatefrom
Shalini-Ashokan:fix-editor-failures
May 7, 2026
Merged

[iOS/macCatalyst] [Candidate Fix] Editor shadow and theme regression caused by BackgroundColor reset on initial handler connection#35343
kubaflo merged 2 commits into
dotnet:inflight/candidatefrom
Shalini-Ashokan:fix-editor-failures

Conversation

@Shalini-Ashokan
Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Root Cause of the Regression

PR #34741's MapBackground overrides call platformView.BackgroundColor = null during initial handler connection (when Background is null by default), making Editor controls transparent at startup — breaking shadow rendering and app-theme color bindings.

Description of Change

In EditorHandler.iOS.cs, replaced platformView.BackgroundColor = null with platformView.BackgroundColor = ColorExtensions.BackgroundColor (UIColor.SystemBackground) so the Editor restores the system's adaptive default color instead of becoming transparent. This preserves shadow rendering on initial load and correctly responds to light/dark theme changes.

Issues Fixed

UI Test

iOS:
VerifyEditorPlaceholderWithShadow, VerifyEditor_WithShadow, ShadowsDontRespectControlShape

Mac:
VerifyEditorPlaceholderWithShadow, VerifyEditor_WithShadow, ShadowsDontRespectControlShape, EditorAndEntryInputFieldsShouldChangeColorsOnAppThemeChange, EntryAndEditorPlaceholderTextColorAppThemeBindingUpdatesOnThemeChange, EntryAndEditorTextColorAppThemeBindingUpdatesOnThemeChange - Fails due to this PR - #34741

@dotnet-policy-service dotnet-policy-service Bot added the community ✨ Community Contribution label May 7, 2026
@dotnet-policy-service
Copy link
Copy Markdown
Contributor

Hey there @@Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label May 7, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review May 7, 2026 12:31
@sheiksyedm sheiksyedm requested a review from kubaflo May 7, 2026 12:31
@sheiksyedm sheiksyedm changed the title [iOS/macCatalyst] Fix Editor shadow and theme regression caused by BackgroundColor reset on initial handler connection [iOS/macCatalyst][Candidate Fix]Editor shadow and theme regression caused by BackgroundColor reset on initial handler connection May 7, 2026
@sheiksyedm sheiksyedm changed the title [iOS/macCatalyst][Candidate Fix]Editor shadow and theme regression caused by BackgroundColor reset on initial handler connection [iOS/macCatalyst] [Candidate Fix] Editor shadow and theme regression caused by BackgroundColor reset on initial handler connection May 7, 2026
@kubaflo kubaflo merged commit 561aa8a into dotnet:inflight/candidate May 7, 2026
4 of 11 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR7 milestone May 7, 2026
github-actions Bot pushed a commit that referenced this pull request May 25, 2026
…caused by BackgroundColor reset on initial handler connection (#35343)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Root Cause of the Regression
PR #34741's MapBackground overrides call platformView.BackgroundColor =
null during initial handler connection (when Background is null by
default), making Editor controls transparent at startup — breaking
shadow rendering and app-theme color bindings.


### Description of Change
In EditorHandler.iOS.cs, replaced platformView.BackgroundColor = null
with platformView.BackgroundColor = ColorExtensions.BackgroundColor
(UIColor.SystemBackground) so the Editor restores the system's adaptive
default color instead of becoming transparent. This preserves shadow
rendering on initial load and correctly responds to light/dark theme
changes.

 
### Issues Fixed
UI Test

iOS:
VerifyEditorPlaceholderWithShadow, VerifyEditor_WithShadow,
ShadowsDontRespectControlShape
 
Mac:
VerifyEditorPlaceholderWithShadow, VerifyEditor_WithShadow,
ShadowsDontRespectControlShape,
EditorAndEntryInputFieldsShouldChangeColorsOnAppThemeChange,
EntryAndEditorPlaceholderTextColorAppThemeBindingUpdatesOnThemeChange,
EntryAndEditorTextColorAppThemeBindingUpdatesOnThemeChange - Fails due
to this PR - #34741
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-editor Editor area-testing Unit tests, device tests community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants